package xyz.yuzegod.megawalls.event;

import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import xyz.yuzegod.megawalls.game.Game;
import xyz.yuzegod.megawalls.game.GamePlayer;

public class PlayerEnergyChangeEvent extends Event
{
    private static final HandlerList handlers;
    private Game game;
    private GamePlayer player;
    private ChangeReason changeReason;
    private int amount;
    
    public PlayerEnergyChangeEvent(final Game game, final GamePlayer player, final ChangeReason changeReason, final int amount) {
        this.game = game;
        this.player = player;
        this.changeReason = changeReason;
        this.amount = amount;
    }
    
    public static HandlerList getHandlerList() {
        return PlayerEnergyChangeEvent.handlers;
    }
    
    public HandlerList getHandlers() {
        return PlayerEnergyChangeEvent.handlers;
    }
    
    public Game getGame() {
        return this.game;
    }
    
    public GamePlayer getPlayer() {
        return this.player;
    }
    
    public ChangeReason getChangeReason() {
        return this.changeReason;
    }
    
    public int getAmount() {
        return this.amount;
    }
    
    public void setAmount(final int amount) {
        this.amount = amount;
    }
    
    static {
        handlers = new HandlerList();
    }
    
    public enum ChangeReason
    {
        MELLEE, 
        BOW, 
        MAGIC;
    }
}
